<!DOCTYPE html>
<html>
{include file="head.html"}
<body>
<div class="body">
  <div class="header" > <a href="{$appshop}?m=index&a=product"  class="left-btn"><span class="iconfont icon-back"></span></a>
    <div class="title">产品管理</div>
    <div class="right-btn" id="showSearch"><span class="iconfont icon-search"></span></div>
  </div>
  <div class="main-body">
    <form method="get" action="{$appshop}">
      <input type="hidden" name="m" value="shop_product" />
      <input type="hidden" name="a" value="default" />
      <div class="pd-5" id="searchBox" style="display:none;">
        <div class="input-row">
          <label >商品名称</label>
          <input type="text" name="title" value="{$smarty.get.title}" />
        </div>
        <div class="input-row">
          <select name="shop_cid" class="txt">
            <option value="0">请选择分类</option>
            
{foreach item=c key=k from=$shop_cat_list}

            <option value="{$k}" {if $smarty.get.shop_cid eq $k} selected="selected" {/if}>{$c}</option>
            
{/foreach}

          </select>
        </div>
         
         	
       
        
        
        <div class="form-btns">
          <button type="submit"   class="btn btn-warning btn-row" />
          搜索
          </button>
        </div>
      </div>
    </form>
    <div class="plist"> {foreach item=c from=$data}
      <div class="item">
        <div class="g-sd1"><img src="{$c.imgurl|images_site}" onerror="err_imgurl(this)"></div>
        <div class="g-mn1">
          <div class="g-mn1c">
            <div class="title"><a href="/index.php?m=shop_product&a=show&id={$c.id}&shopid={$c.shopid}" target="_blank">{$c.title}</a></div>
            <div class="cat"> <span>￥
              <d class="cor1">{$c.price}</d>
              元</span> <span>小类：{$shop_cat_list[$c[shop_cid]]}</span> <span class="right">大类：{$c.cname}{if $c.cname_2nd}>{$c.cname_2nd}{/if}{if $c.cname_3nd}>{$c.cname_3nd}{/if}</span> </div>
            <div class="tool"> {if $c.is_recommend}<span>已推荐</span>{/if} <span>{if $c.status eq 1}未审核{elseif $c.status eq 2}已通过{/if}</span> <a class="edi" href="/shopadmin.php?m=shop_product&a=add&id={$c.id}">编辑</a> <a href="javascript:;" class="delete" url="/shopadmin.php?m=shop_product&a=delete&ajax=1&id={$c.id}">删除</a></div>
          </div>
        </div>
      </div>
      {/foreach} </div>
    {if $pagelist}
    <div>{$pagelist}</div>
    {/if} </div>
  <script>
$(function(){
	
	$("#showSearch").on(CLICK,function(){
		$("#searchBox").toggle();
	});
	
	
	
})
</script> 
  {include file='footer.html'} </div>
</body>
</html>